/*
* Copyright (c) 18/5/1 foo.com. All Rights Reserved.
*/
package com.cgmnx.admin.model.enums;

import com.cgmnx.admin.common.enums.EnumTrait;

/**
 * 审核状态
 * @author: z Date: 18/5/1 Time: 下午2:05
 * @version: 1.0.0
 */
public enum ReplyAuditStatus implements EnumTrait {

    UN_AUDIT(0, "未审核"),
    PASS(1, "通过"),
    NOT_PASS(2, "未通过"),
    DELETED(3, "已删除");

    private int code;
    private String desc;

    ReplyAuditStatus(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static ReplyAuditStatus codeOf(int code) {
        for (ReplyAuditStatus status : ReplyAuditStatus.values()) {
            if (status.code == code) {
                return status;
            }
        }
        return null;
    }

    @Override
    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}